package com.pingan.haofang.searchcloud.index.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

/**
 * 索引列表查询结果
 *
 * @author baojie371
 * @date 17/5/3
 * @since 1.0.0
 */
@ApiModel(description = "索引列表查询结果")
public class IndexQueryResult {

    @ApiModelProperty("索引ID")
    private long id;

    @ApiModelProperty("项目ID")
    private long projectId;

    @ApiModelProperty("索引名称")
    private String indexName;

    @ApiModelProperty("索引别名")
    private String indexAliasName;

    @ApiModelProperty("引擎 0：SOLR 1：ES")
    private int engineType;

    @ApiModelProperty("集群名（集群唯一标示）")
    private String clusterName;

    @ApiModelProperty("状态 0：正常 1：停用")
    private int status;

    @ApiModelProperty("Metadata的状态 0：正常 1：停用")
    private int metadataStatus;

    @ApiModelProperty("索引简介")
    private String introduction;

    @ApiModelProperty("创建人ID")
    private long createBy;

    @ApiModelProperty("创建人名称")
    private String createByName;

    @ApiModelProperty("分片数量")
    private int shardCount;

    @ApiModelProperty("副本数")
    private int replicationFactor;

    @ApiModelProperty("每个节点最大分片数")
    private int maxShardsPerNode;

    @ApiModelProperty("搜索地址")
    private String host;

    @ApiModelProperty("配置版本")
    private int configVersion;

    @ApiModelProperty("创建时间")
    private Date createTime;

    public String getClusterName() {
        return clusterName;
    }

    public void setClusterName(String clusterName) {
        this.clusterName = clusterName;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getProjectId() {
        return projectId;
    }

    public void setProjectId(long projectId) {
        this.projectId = projectId;
    }

    public String getIndexName() {
        return indexName;
    }

    public void setIndexName(String indexName) {
        this.indexName = indexName;
    }

    public String getIndexAliasName() {
        return indexAliasName;
    }

    public void setIndexAliasName(String indexAliasName) {
        this.indexAliasName = indexAliasName;
    }

    public int getEngineType() {
        return engineType;
    }

    public void setEngineType(int engineType) {
        this.engineType = engineType;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getMetadataStatus() {
        return metadataStatus;
    }

    public void setMetadataStatus(int metadataStatus) {
        this.metadataStatus = metadataStatus;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(long createBy) {
        this.createBy = createBy;
    }

    public String getCreateByName() {
        return createByName;
    }

    public void setCreateByName(String createByName) {
        this.createByName = createByName;
    }

    public int getShardCount() {
        return shardCount;
    }

    public void setShardCount(int shardCount) {
        this.shardCount = shardCount;
    }

    public int getReplicationFactor() {
        return replicationFactor;
    }

    public void setReplicationFactor(int replicationFactor) {
        this.replicationFactor = replicationFactor;
    }

    public int getMaxShardsPerNode() {
        return maxShardsPerNode;
    }

    public void setMaxShardsPerNode(int maxShardsPerNode) {
        this.maxShardsPerNode = maxShardsPerNode;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getConfigVersion() {
        return configVersion;
    }

    public void setConfigVersion(int configVersion) {
        this.configVersion = configVersion;
    }

    @Override
    public String toString() {
        return "IndexQueryResult{" +
                "id=" + id +
                ", projectId=" + projectId +
                ", indexName='" + indexName + '\'' +
                ", indexAliasName='" + indexAliasName + '\'' +
                ", engineType=" + engineType +
                ", clusterName='" + clusterName + '\'' +
                ", status=" + status +
                ", metadataStatus=" + metadataStatus +
                ", introduction='" + introduction + '\'' +
                ", createBy=" + createBy +
                ", createByName='" + createByName + '\'' +
                ", shardCount=" + shardCount +
                ", replicationFactor=" + replicationFactor +
                ", maxShardsPerNode=" + maxShardsPerNode +
                ", host='" + host + '\'' +
                ", configVersion=" + configVersion +
                ", createTime=" + createTime +
                '}';
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

}
